

*********************************
*	Author: Rithika Kumar	    *
*   GOAL: Summary Stats 	    *
*   Table 2 and 3 (MAIN TEXT)   * 
*********************************


*******************************************************
*	Set Path to "JOP Replication files" on your computer		        
*******************************************************


** Import main DID dataset 

clear
use "DATA FILES TO SHARE/main_ew_hh_df.dta", clear 

*use "DATA FILES TO SHARE/TEMP_FILES/main_ew_hh_df.dta", clear

gen did = 0 
replace did = 1 if mig_husb == 1 & year == 1



rename mob_score_norm mob
rename dec_score_norm dec_hh
rename pol_score_norm pol
rename GR_hh_cash cash
rename GR_hh_acname own_ac
est clear


** Table 3
est clear
foreach i in dec_hh pol {

**** 1. naive regresion 
 reg `i' mig_husb, vce(cluster vill_id_num)
eststo `i'_naive

***** 2. Naive with controls 
 reg `i' mig_husb EW_Age EW_child dil_dummy rel_hindu EW_edu i.GROUPS8 ASSETS5 FM1 i.DISTID , vce(cluster vill_id_num)
eststo `i'_reg_naive


***** 3. DID naive

 reg `i' i.w2_abshusband_dummy i.year did if did_sample == 1 , vce(cluster vill_id_num) 
 eststo `i'_reg_did_naive

** 4. DID with controls
reg `i' i.w2_abshusband_dummy i.year did dil_dummy EW_health EW_Age ASSETS5 FM1 if did_sample == 1, vce(cluster vill_id_num)
eststo `i'_reg_did_controls



 ** 5. DID with Individual FE and controls
 **  Only one woman from each HH and therefore hhuid_num
 xtset hhuid_num year
 xtreg `i' did i.year dil_dummy EW_health EW_Age ASSETS5 FM1 if did_sample==1, fe vce(cluster vill_id_num)
eststo `i'_reg_didFE

}

*** Export results 

estout dec_hh_* pol_* ///
  using "OUTPUT/TABLES/Table_3_decpol_test.tex", replace ///
    title("DV: Female Autonomy") ///
    label  ///
    prehead("\begin{table}[H]" "\small" "\centering" "\caption{Male migration increases female autonomy}" ///
            "\begin{tabular}{lcccccccccc}" "\toprule" ///
            "& \multicolumn{5}{c}{\textbf{Bargaining Power}} & \multicolumn{5}{c}{\textbf{Political Engagement}}\\" ///
            "&(1)&(2) & (3) & (4) &(5)&(6)&(7) & (8) & (9) &(10)\\" "\hline" "\hline") ///
    posthead("") keep(mig_husb 1.w2_abshusband_dummy 1.year did) varlabels(mig_husb "Migrant Husband" 1.w2_abshusband_dummy "Migrant Husband"  1.year "Wave 2" did  "Migrant Husband  $\times$ Wave 2") ///
	stats(r2_a N, fmt(%9.4f %9.0f) labels("Adj.R2" "Observations")) cells(b(fmt(a2) star) se(par fmt(a2))) starlevels(* 0.10 ** 0.05 *** 0.01) style(tex) collabels(, none) mlabels(, none) ///
    prefoot("\midrule Model &OLS &OLS&DID&DID&DID&OLS &OLS&DID&DID&DID \\" "Controls & No & Yes & No & Yes & Yes& No & Yes & No & Yes & Yes"  "Individual FE & No & No & No & No & Yes & No & No & No & No & Yes" "Migrant Husband & All & All & Wave 2 & Wave 2 & wave 2& All & All & Wave 2 & Wave 2 & wave 2"  " \midrule")   nonumber ///
     postfoot( "\bottomrule" "\end{tabular}" "\label{tab:poleng}" "\begin{tablenotes}" ///
             "\noindent Notes: Having a migrant husband at the time of the second wave of the survey increases female autonomy. Bargaining power is an index that measures the ability of women to partake in key decisions within the household. Political engagement index measures the ability of women to discuss politics and their knowledge of child welfare entitlements. Since the questions regarding the entitlements is only asked of women with children below six years, the sample reduces. Details about the dependent variables are given in Appendix B. Standard errors are clustered at the village level - primary sampling unit. Specifications with fixed effects at the district, sub-district and village level, and rural only sample given in Appendix D." "\end{tablenotes}" "\end{table}")
 

 *** 2. Table 4

est clear
 foreach i in mob cash own_ac { 
 
 * 1. OLS with controls 
 reg `i' mig_husb EW_Age EW_child dil_dummy rel_hindu EW_edu i.GROUPS8 ASSETS5 FM1 i.DISTID , vce(cluster vill_id_num)
eststo `i'_reg_naive

* 2. DID with FE but without controls 

   reghdfe `i' i.w2_abshusband_dummy i.year did if did_sample == 1 , absorb(hhuid_num) vce(cluster vill_id_num)
eststo `i'_reg_did

* 2. DID with FE and controls 
      reghdfe `i' i.w2_abshusband_dummy i.year did dil_dummy EW_health EW_Age ASSETS5 FM1 if did_sample == 1 , absorb(hhuid_num) vce(cluster vill_id_num)
eststo `i'_reg_did_control
   
}





estout mob* cash* own_ac* ///
  using "OUTPUT/TABLES/Table_4_mob_fin.tex", replace ///
    title("DV: Female Autonomy") ///
    label  ///
    prehead("\begin{table}[H]" "\small" "\centering" "\caption{Male migration increase autonomy over mobility and finances}" ///
            "\begin{tabular}{lccccccccc}" "\toprule" ///
            "& \multicolumn{3}{c}{\textbf{Autonomy over Mobility}} & \multicolumn{3}{c}{\textbf{Access to Cash}}& \multicolumn{3}{c}{\textbf{Personal Bank Account}}\\" ///
            "&(1)&(2) & (3) & (4) &(5)&(6)&(7) & (8) & (9)\\" "\hline" "\hline") ///
    posthead("") keep(mig_husb 1.year did) varlabels(mig_husb "Migrant Husband"  1.year "Wave 2" did  "Migrant Husband  $\times$ Wave 2") ///
	stats(r2_a N, fmt(%9.4f %9.0f) labels("Adj.R2" "Observations")) cells(b(fmt(a2) star) se(par fmt(a2))) starlevels(* 0.10 ** 0.05 *** 0.01) style(tex) collabels(, none) mlabels(, none) ///
    prefoot("\midrule Model &OLS DID&DID&OLS&DID &DID&OLS&DID&DID \\" "Controls & Yes & No & Yes & Yes & No & Yes& Yes & No & Yes"  "Individual FE & No & Yes & Yes & No & Yes & Yes& No & Yes & Yes" "Migrant Husband & All & Wave 2 & Wave 2 & All & Wave 2 & Wave 2& All & Wave 2 & Wave 2"  " \midrule")   nonumber ///
     postfoot( "\bottomrule" "\end{tabular}" "\label{tab:main_mhbh}" "\begin{tablenotes}" ///
             "\noindent Notes: Effect of contemporaneous absence of a woman's husband due to migration thrusts her into the public sphere as characterized through an increase in her autonomy over mobility and finances. The dependent variable is normalized to take a value between 0 and 1. Details are given in Appendix B. Standard errors are clustered at the village level - primary sampling unit. Other OLS estimates and specifications with fixed effects at the district, sub-district and village level are included in Appendix D. Specifications with autonomy of mobility to health centers are given in Appendix D.6. Source: Indian Human Development Study - I and II" "\end{tablenotes}" "\end{table}")


  
  
  
  
  
  
  
  
  
  
  
  
  
  
  